﻿//-----------------------------------------------------------------------
// <copyright>
// This file is subject to the terms and conditions of the Microsoft Public License (MS-PL).
// See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL for more details.
// </copyright>
//----------------------------------------------------------------------- 
using System.Collections.Generic;
using Fulcrum.WeakEventManager;

namespace Fulcrum.UnitTests.WeakEventManager
{
    class MockWemGeneratorConfig : IWeakEventManagerGeneratorConfiguration
    {
        public MockWemGeneratorConfig()
        {
            // nothing
        }

        public static MockWemGeneratorConfig CreateMock()
        {
            var generatorConfig = new MockWemGeneratorConfig();

            generatorConfig.Company = "Mock Company";
            generatorConfig.Copyright = "Mock Copyright";
            generatorConfig.Namespace = "Mock.Namespace";

            //
            // Make weak event manager configs
            //
            var weakEventManagers = new List<IWeakEventManagerConfiguration>();

            var weakEventManagerOne = new MockWemConfig();
            weakEventManagerOne.EventArgs = "MockEventArgsOne";
            weakEventManagerOne.EventName = "MockEventNameOne";
            weakEventManagerOne.EventSource = "MockEventSourceOne";
            weakEventManagerOne.Name = "MockNameOne";
            weakEventManagers.Add(weakEventManagerOne);

            var weakEventManagerTwo = new MockWemConfig();
            weakEventManagerTwo.EventArgs = "MockEventArgsTwo";
            weakEventManagerTwo.EventName = "MockEventNameTwo";
            weakEventManagerTwo.EventSource = "MockEventSourceTwo";
            weakEventManagerTwo.Name = "MockNameTwo";
            weakEventManagers.Add(weakEventManagerTwo);
            
            generatorConfig.WeakEventManagers = weakEventManagers;

            return generatorConfig;
        }

        public string Company
        {
            get;
            set;
        }

        public string Copyright
        {
            get;
            set;
        }

        public string Namespace
        {
            get;
            set;
        }

        public ICollection<IWeakEventManagerConfiguration> WeakEventManagers
        {
            get;
            private set;
        }

    }
}
